<!DOCTYPE html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>会议室预约</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/meeting/css/style.css">
</head>
<body>
<div class="wraper normal" js="wapjs/meeting/js/index">
    <div class="head head-search clearfix">
        <!--<a href="/meeting/Meeting/ucenter/account_id/{BEESCRM:$accountId}" class="iconfont icon-zuo" style="width: 10%;"></a>-->
        <a href="javascript:history.back(-1);" class="iconfont icon-zuo" style="width: 10%;"></a>
        <div class="search-box">
            <input name="meeting_name" placeholder="搜索会议室" class="search" />
            <span class="iconfont icon-sousuo text-green"></span>
        </div>
        <a href="javascript:void(0);" class="iconfont icon-shaixuan2 filter" data-account_id="{BEESCRM:$accountId}"></a>
    </div>

    <div class="content">
        <if condition="$data">

            <foreach name="data" item="vo">
                <div class="lists tb-mode">
                    <div class="room-img tb-cell">
                        <if condition="$vo.room_picture neq ''">
                            <img src="{BEESCRM:$vo.room_picture}"/>
                            <else />
                            <img src="/assets/meeting/images/meetingroom.jpg"/>
                        </if>
                    </div>

                    <div class="text-block tb-cell">
                        <p class="title">{BEESCRM:$vo.room_name}
                            <span class="classify-label text-gray">{BEESCRM:$vo.style_name}</span>
                        </p>
                        <p class="text-gray"><span class="iconfont icon-renshu"></span> {BEESCRM:$vo.capacity}人</p>
                        <p class="text-gray"><span class="iconfont icon-quyushuxing"></span> {BEESCRM:$vo.area_name}</p>
                        <p class="text-gray"><span class="iconfont icon-ditu"></span> <span class="shenglue">{BEESCRM:$vo.address}</span></p>

                        <p class="text-gray"><span class="iconfont icon-jiudianwuxianhuatong32px"></span>
                            <span class="shenglue"><a href="javascript:void(0);" class="text-green service" data-id="{BEESCRM:$vo.meeting_room_id}">查看会议室服务</a></span>
                        </p>
                    </div>

                    <div class="tb-cell text-right">
                        <a href="{BEESCRM::U('/meeting/meetingRoom/weekPanel',array('level' => 0,'account_id' => $accountId,'meeting_room_id' => $vo['meeting_room_id']))}" class="iconfont icon-you big-right"></a>
                    </div>
                </div>
            </foreach>
            <else />
            <div class="norecord">
                <img src="/assets/meeting/images/nomeeting.png"/>
                <p class="text-gray">无相关会议室</p>
            </div>
        </if>
    </div>
</div>
<div class="" id="service"> <!--选择会议室设备弹窗choiceServer.html-->
</div>


<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<script type="text/javascript" src="/assets/public/jquery-2.1.0.min.js"></script>
<include file="new/roomfilter" />

<script>
    $(document).on('click','.service',function() { //查看会议服务

        var data = {};
        data.meeting_room_id = $(this).data('id');
        $.ajax({
            url: '/meeting/meetingRoom/getMeetingServer/account_id/{BEESCRM:$accountId}',
            type: 'post',
            data: data,
            dataType: 'json',
            success:function(data) {
                if(data.status == 'S') {
                    $("#service").html(data.message);
                    $(".servicePop").show();
                } else if(data.status == 'F') {

                }
            }
        });
    })

    $('.search').bind('input propertychange',function(){
        var data = {};
        data.meeting_name = $(this).val();
        var content = '';
        $.ajax({
            url: '/meeting/meetingRoom/getMeetingRoomByName/account_id/{BEESCRM:$accountId}',
            type: 'post',
            data: data,
            dataType: 'json',
            success:function(data) {
                if(data.status == 'S') {
                    var room = data.message;
                    if(!room) {
                        content = '<div class="norecord"> <img src="/assets/meeting/images/nomeeting.png"/> <p class="text-gray">无相关会议室</p> </div>';
                    } else {
                        $.each(room,function(key,value) {
                            content = content +  '<div class="lists tb-mode">' +
                                    '<div class="room-img tb-cell"><img src="/assets/meeting/images/meetingroom.jpg"/></div>' +
                                    '<div class="text-block tb-cell"> ' +
                                    '<p class="title">'+value["room_name"]+'<span class="classify-label text-gray">'+value["style_name"]+'</span></p>' +
                                    '<p class="text-gray"><span class="iconfont icon-renshu"></span> '+value["capacity"]+'人</p>' +
                                    '<p class="text-gray"><span class="iconfont icon-quyushuxing"></span>'+value["area_name"]+'</p>' +
                                    '<p class="text-gray"><span class="iconfont icon-ditu"></span> <span class="shenglue">'+value["address"]+'</span></p>' +
                                    '<p class="text-gray"><span class="iconfont icon-jiudianwuxianhuatong32px"></span> ' +
                                    '<span class="shenglue"><a href="javascript:void(0);" class="text-green service" data-id="'+value["meeting_room_id"]+'">查看会议室服务</a></span> ' +
                                    '</p> ' +
                                    '</div><div class="tb-cell text-right"> ' +
                                    '<a href="/meeting/meetingRoom/weekPanel/level/0/meeting_room_id/'+value["meeting_room_id"]+'/account_id/{BEESCRM:$accountId}" class="iconfont icon-you big-right"></a>' +
                                    ' </div> </div>' ;
                        })
                    }
                    $(".content").html(content);

                } else if(data.status == 'F') {

                }
            }
        });
    })

</script>
</body>
</html>